home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / gcc / libnix.lha / gnu / lib / libnix / sources.lha / nix / string / memset.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-04  |  170 b   |  15 lines

  1. #include <string.h>
  2.  
  3. void *memset(void *s,int c,size_t n)
  4.   if (n != 0)
  5.   {
  6.     unsigned char *p=s;
  7.     do
  8.     {
  9.       *p++=c;
  10.     }while(--n != 0);
  11.   }
  12.   return s;
  13. }
  14.